<!doctype html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" type="text/css" href="${staticpath}/front/dist/css/sm.css">
    <link rel="stylesheet" type="text/css" href="${staticpath}/front/dist/css/base.css">
    <title>补卡审批</title>
    <style>
        .approve-record{height: 100%;line-height: 45px;}
        .approve-item{ position: relative;padding:5px 10px;background: #fff;border-bottom: 1px solid #dadada;}
        .approve-item p{margin: 0 ;}
        .approve-item p:nth-of-type(2){color: #999;}
        .icon-right{position: absolute;top: 50%;right:10px;transform: translateY(-50%);-webkit-transform:translateY(-50%); }
    </style>
</head>
<body>
<div class="page-group">
    <div class="page" data-url="${basepath}/front/offline/toOfflineResignApprove" >
        <!--头部内容 !-->
        <header class="bar bar-nav">
            <a href="${basepath}/front/account/toAccountList" class="icon icon-left pull-left back" >返回</a>
            <h1 class="title">补卡审批 </h1>
            <a href="${basepath}/front/offline/toOfflineResignApproveRecordList" class="pull-right approve-record">记录</a>
        </header>
        <div class="content">
            <#--<div class="approve-item">-->
                <#--<p>活动名称</p>-->
                <#--<p>2017/08/12 12:12:10</p>-->
                <#--<p>林志伟</p>-->
                <#--<span class="pull-right icon icon-right"> </span>-->
            <#--</div>-->
            <#--<div class="approve-item">-->
                <#--<p>活动名称</p>-->
                <#--<p>2017/08/12 12:12:10</p>-->
                <#--<p>林志伟</p>-->
                <#--<span class="pull-right icon icon-right"> </span>-->
            <#--</div>-->
        </div>
    </div>
</div>




<script type='text/javascript' src='${staticpath}/front/dist/js/lib/zepto.js' charset='utf-8'></script>
<script>
    $.config={
        router:false
    }
</script>
<script type='text/javascript' src='${staticpath}/front/dist/js/lib/sm.js' charset='utf-8'></script>
<script>
    //查询待审批列表
    $.ajax({
        url:'/front/retroactive/initList ',
        type:'GET',
        dataType:'json',
        success:function(res){
            if(res.success){
                var dataList=res.data;
                var listHtml='';
                $.each(dataList,function(i,o){
                    listHtml+='<div class="approve-item" data-id="'
                    +o.rid+'"><p>'
                    +o.offlineName+'</p><p>'
                    +o.applyTime+'</p> <p>'
                    +o.applicantName+'</p> <span class="pull-right icon icon-right"> </span> </div>'
                })
                $('.content').html(listHtml);

//                跳转审批操作页面
                $(document).on('click','.approve-item',function(){
                    var url=$('.page').attr('data-url');
                    var id=$(this).attr('data-id');
                    window.location.href=url+'?id='+id;
                })
            }
        }
    })


$.init();
</script>
</body>
</html>